#pragma once
#include"myMiniEngine/Window.h"
#include"GLFW/glfw3.h"
#include"myMiniEngine/Log.h"
#include"myMiniEngine/Events/Event.h"
#include"myMiniEngine/Events/KeyEvent.h"
#include"myMiniEngine/Events/MouseEvent.h"
#include "myMiniEngine/Events/ApplicationEvent.h"
#include"imgui.h"

#include "myMiniEngine/Renderer/GraphicsContext.h"

#include<string>


namespace myMiniEngine {
class WindowsWindow:public Window
{
public:
	WindowsWindow(const WindowProps& props);
	virtual ~WindowsWindow();

	void OnUpdate() override;

	inline unsigned int GetWidth() const override { return data.Width; }
	inline unsigned int GetHeight() const override { return data.Height; }

	// Window attributes
	inline void SetEventCallback(const EventCallbackFn& callback) override { data.EventCallback = callback; }
	void SetVSync(bool enabled) override;
	bool IsVSync() const override;

	inline virtual void* GetNativeWindow() const { return window; }

private:
	virtual void Init(const WindowProps& props);
	virtual void Shutdown();

private:
	GLFWwindow* window;
	GraphicsContext* context;
	 
	struct WindowData {
		std::string Title;
		unsigned int Width;
		unsigned int Height;
		bool VSync;

		EventCallbackFn EventCallback;

	};

	WindowData data;
};
}



